package cn.edu.nju.askinginhand.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class AudioAnswerActivity extends Activity {

	   private TextView titleText=null;
	   private EditText answerEdit=null;
	   private Button listenBtn=null;
	   private Button submitBtn=null;
	
	public void onCreate(Bundle savedInstanceState){
		
		 super.onCreate(savedInstanceState);
		 setContentView(R.layout.audio_answer);
		 
		 titleText=(TextView) findViewById(R.id.titleText);
		 answerEdit=(EditText)findViewById(R.id.answerEdit);
		 listenBtn=(Button)findViewById(R.id.listen);
		 submitBtn=(Button)findViewById(R.id.submitBtn);
		 
		 initListeners();
	}
	
	public void initListeners(){
		 listenBtn.setOnClickListener(new OnClickListener(){

			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent=new Intent(AudioAnswerActivity.this,MediaPlayerNewActivity.class); 
				intent.putExtra("path", "http://ai666.com.cn/flash/music/2.mp3");
				startActivityForResult(intent, 0);
			}
			 
		 });
		 
		 submitBtn.setOnClickListener(new OnClickListener(){

				public void onClick(View v) {
					// TODO Auto-generated method stub
					
				}
				 
			 });
	}
	
}
